# delimit ;

clear all;
clear matrix;
set mem 800m;
set more off;

*add your path here:;
capture cd "C:\Users\jamesCabral\OneDrive - DAZ\CGH_Empirical_Replication";

************************************************************************************************************;
cd "data\ATUS_AHTUS_raw_data\ATUS_ALL";
use ATUS_ALL_FINAL;

cd "..\..\ATUS_AHTUS_state_datasets";

gen age1=0;
replace age1=1 if age>=18 & age<=27;
gen age2=0;
replace age2=1 if age>=28 & age<=37;
gen age3=0;
replace age3=1 if age>=38 & age<=47;
gen age4=0;
replace age4=1 if age>=48 & age<=57;
gen age5=0;
replace age5=1 if age>=58 & age<=65;
gen educ1=0;
replace educ1=1 if grade<12;
gen educ2=0;
replace educ2=1 if grade==12;
gen educ3=0;
replace educ3=1 if grade>12 & grade<16;
gen educ4=0;
replace educ4=1 if grade>=16;

drop if age>65;
drop if age<18;
drop if other>0;

tabout year if gestfips==1            [aw=weight_adj] using state_dataset_year_temp.xls, replace format(8) ptotal(none) lines (none)                            sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==2            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==4            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==5            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==6            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==8            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==9            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==10            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==11            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==12            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==13            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==15            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==16            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==17            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==18            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==19            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==20            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==21            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==22            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==23            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==24            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==25            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==26            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==27            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==28            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==29            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==30            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==31            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==32            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==33            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==34            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==35            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==36            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==37            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==38            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==39            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==40            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==41            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==42            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==44            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==45            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==46            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==47            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==48            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==49            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==50            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==51            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==53            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==54            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==55            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);

tabout year if gestfips==56            [aw=weight_adj] using state_dataset_year_temp.xls, append  format(8) h1(nil) h2(nil) h3(nil) ptotal(none) lines (none)    sum cells(mean gestfips N work_paper mean year mean male mean age mean age1 mean age2 mean age3 mean age4 mean age5 mean educ1 mean educ2 mean educ3 mean educ4 mean spouse_emp mean married mean black mean hv_child mean num_child mean grade mean working mean unemp mean retired mean disabled mean student mean homemaker  mean work_paper mean worka_paper mean worku_paper mean leisure_paper mean ep_paper mean sleeping_paper mean esp_paper mean tv_paper mean otherleisure_paper mean socializing_paper mean home_paper mean homeproduction_paper mean homeown_paper mean shopping_paper mean othercare_paper mean childcare_paper mean other_paper mean education_paper mean civic_paper mean ownmedical_paper mean unclassified_paper) show(none);